class Dictionary:
    internalDict = dict()
    #Common methods
    def isEmpty(self):
        return self.size() == 0

    def size(self):
        return len(self.internalDict)

    def checkNotEmpty(self):
        if self.isEmpty():
            raise Exception("Empty Dictionary!  There are no elements to work with.")

    def __repr__(self):
        return "a Dictionary with[" + ( ", ".join(self.internalItemsString()) ) + "]"

    def internalItemsString(self):
        reps = []
        for k,v in self.internalDict.items():
            reps.append(str(k) + "=>" + str(v))
        return reps

    #End of Common methods

    def __getitem__(self, key):
        return self.internalDict[key]

    def __setitem__(self, key, item):
        self.internalDict[key] = item

    def remove(self, key):
        del self.internalDict[key]

    def includesKey(self, key):
        return key in self.internalDict

def createDictionary():
    return Dictionary()

def sizeOfDictionary(dictionary):
    return dictionary.size()

def removeFromDictionary(dictionary, key):
    return dictionary.remove(key)

def isEmptyDictionary(dictionary):
    return dictionary.isEmpty()

def includesKeyDictionary(dictionary, key):
    return dictionary.includesKey(key)
